﻿
Imports System.Data
Imports VSModel
Imports Cls_Common
Partial Class FrontEnd_Control_Menu_AmThuc
    Inherits System.Web.UI.UserControl
    Public curStoreURL As String = ""

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then
            LoadMenu()
        End If
    End Sub
    Protected Sub LoadMenu()
            Dim lstNode As New DataSet
        lstNode.ReadXml(MapPath("../../../xml/AmThuc.xml"))
        With rptMenu
            .DataSource = lstNode.Tables("Node")
            .DataBind()
        End With

    End Sub

    

    Protected Sub rptMenu_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.RepeaterItemEventArgs) Handles rptMenu.ItemDataBound


        Dim hplTitle As HyperLink = CType(e.Item.FindControl("hplTitle"), HyperLink)
        hplTitle.NavigateUrl = MainDomain & e.Item.DataItem("URL")
        hplTitle.Text = e.Item.DataItem("Title")

      

        'end bind menu

    End Sub

End Class
